#pragma once

#include <ECS/ECS.h>
#include <ECS/Signals.h>
#include "Types.h"

class GameObject : public ECS::Assembly
{
	mtMETA_DEC;
public:
	GameObject();

	void start();
	void destroy();

	bool isEnabled() const;

	void setEnabled(bool enabled);
	
	Signal<void()> eventUpdate;

	static void updateAll();
	static GameObject* findObject(const char* name);
protected:
	bool _isEnebled;

	void update();
	
	static Signal<void()> eventUpdateAll;
	Slot<void()> _slotUpdate;
};

